<?php
$link = mysqli_connect("localhost","root","root","2113");
$username=$_POST['username'];
$pwd=$_POST['pwd'];
if(!empty($username)){
	$sql="INSERT INTO users(username,pwd) VALUES ('$username','$pwd')";
}

$res = mysqli_query($link,$sql);
if($res){
	$arr['status'] = 1;
	$arr['info'] = "添加成功";
}else{
	$arr['status'] = 0;
	$arr['info'] = "添加失败";
}
echo json_encode($arr);
?>